<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name = "viewport" content = "width=device-width, maximum-scale = 1, minimum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="target-densitydpi=device-dpi,width=640,user-scalable=0">
<title>车栈-卖车</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<script text="type/javascript" src="js/jquery.js"></script>
		<script src="js/mui.min.js"></script>;
		<script src="js/app.js"></script>;
		<script type="text/javascript" language="javascript" src="js/jquery-1.8.2.min.js"></script>
<!--日期选择-->
<link rel="stylesheet" href="css/calendar.css">
<style type="text/css">.calendar {
	position: absolute;
	top: 32% !important;
}</style>

</head>

<body>
<section class="section">
  <div class="top-gray"> <a href="" class="back"><img src="images/back-gray.png"></a> <a class="pro_t">卖车</a></div>
  <div class="clear"></div>
  <div class="pos-top">
  <form action="" class="login" method="post">
  <div class="zhmm">
  <label class="buy"><span>*</span>姓名</label>
  <input type="text"  class="buy_info" id="name" name="name" /></div>
  <div class="zhmm">
  <label class="buy"><span>*</span>电话</label>
  <input type="text"  class="buy_info" name="phone" id="phone"/></div>
 
   <div class="zhmm">
   <label class="labelnx"><span>*</span>首次上牌日期</label>
  <input type="text" readonly="readonly" class="nianxian riqi" id="dt" name="car_data" placeholder="请选择上牌日期">
  <div id="dd"></div></div>
  <div class="zhmm">
  <label class="buy"><span>*</span>里程数</label>
  <input type="text"  class="buy_info" id="distance" name="distance" /></div>
  <div class="zhmm">
  <label class="buy"><span>*</span>品牌</label>
  <input type="text"  class="buy_info"  id="brand" name="brand”"/></div>
    <div class="zhmm">
  <label class="buy"><span>*</span>型号</label>
  <input type="text"  class="buy_info" name="model" id="model" /></div>
  <div class="zhmm">
  <label class="buy"><span>*</span>颜色</label>
  <input type="text"  class="buy_info" id="color" name="color"/></div>
   <div class="zhmm">
   <lable  class="baoyang">
				<i class='input_style radio_bg'><input type="radio" name="maintain" id="maintain" value="0"></i>
				4S店保养
			</lable>
			<lable class="baoyang">
				<i class='input_style radio_bg'><input type="radio" name="maintain" id="maintain" value="2"></i>
				非4S店保养
			</lable></div>
  <input type="button" id="sub_btn"  class="butl" value="确定" >
</form>    
  </div><script text="type/javascript" src="js/jquery.js"></script>

	<script text="type/javascript" src="js/input.js"></script>
<script src="js/calendar.js"></script> 
  <script>$('#dd').calendar({
	trigger: '#dt',
	zIndex: 999,
	format: 'yyyy-mm-dd',
	onSelected: function(view, date, data) {
		console.log('event: onSelected')
	},
	onClose: function(view, date, data) {
		console.log('event: onClose')
		console.log('view:' + view)
		console.log('date:' + date)
		console.log('data:' + (data || 'None'));
	}
});</script>
<script src="js/cartjs.js"></script>
</section>
</body>
</html>
	<script>(function(mui, doc) {
	mui.init({
		statusBarBackground: '#000000'
	});

	mui.plusReady(function() {
		var network = true;
		if(mui.os.plus) {
			mui.plusReady(function() {
				if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
					network = false;
				}
			});
		}
		var subbtn = doc.getElementById('sub_btn');

		subbtn.addEventListener('tap', function(event) {
			var datas = $("#myform").serializeArray();

			var postData = {
				apiUrl: web_url + "page_cardeal/cardeal_add.shtml",
				datas: {
					name: $("#name").val(),
					phone: $("#phone").val(),
					car_data: $("#car_data").val(),
					distance: $("#distance").val(),
					brand: $("#brand").val(),
					model: $("#model").val(),
					color: $("#color").val(),
					maintain: $("#maintain").val(),
					type: 1
				}
			};

			app.postServer(postData,
				function(result) {
					mui.toast("恭喜您提交成功，请等待工作人员与您联系");
					var ws = plus.webview.currentWebview();
					plus.webview.close(ws);

				},
				function(err) {
					if(err) {
						plus.nativeUI.toast(err);
						return;
					}
				}
			);

		}, false);
	});

}(mui, document));
	
	
	</script>